import logging
#try:
#    print 'try......'
#    r = 10 / 0
#    print 'result:',r
#except ZeroDivisionError,e:
#    print 'except:',e
#finally:
#    print 'finally....'
#
#print 'End'

#try:
#    print 'try......'
#    r = 10 / int('a')
#    print 'result:',r
#except ValueError,e:
#    print 'ValueError:',e
#except ZeroDivisionError,e:
#    print 'ZeroDivisionError:',e
#else:
#    print 'no error!'
#finally:
#    print 'finally...'
#print 'End'
#def foo(s):
#    return 10 / int(s)
#
#def bar(s):
#    return foo(s) * 2
#
#def main():
#    try:
#        bar('0')
#    except StandardError,e:
#        logging.exception(e)
#    finally:
#        print 'finally...'
#
#def main1():
#    bar('0')

#main()
#print 'Error'

#class FooError(StandardError):
#    pass
#
#def foo(s):
#    n = int(s)
#    if n==0:
#        raise FooError('invalid value: %s' % s)
#    return 10/n
#if __name__=="__main__":
#    foo(0)

def foo(s):
    n  = int(s)
    return 10 / n

def bar(s):
    try:
        return foo(s) * 2
    except StandardError,e:
        print 'Error!'
        raise

if __name__=="__main__":
    bar(0)
